<?php
if ($_SESSION['user']['id'] === 'wbmstr' && $_SESSION['user']['level'] === 1) {
    echo '<br>&nbsp;<br>Maaf anda tidak dapat melakukan setting account.';
} else {
    $mPerson = new CorePerson($_SESSION['User']['Id']);
    $tEmail = $mPerson->GetEmail();
    if (!$tEmail)
        $tEmail = '<span class="NotSet">belum diset</span>';
    ?>

    <div id="Akun-Menu">
        <ul>
            <li id="AkunMenu-Profil" rel="865px">Profil</li>
            <li id="AkunMenu-Setting" class="Selected" rel="675px">Pengaturan Akun</li>
        </ul>
        <div id="AkunMenu-Navigator"></div>
    </div>


    <div id="Akun-Container">


        <?PHP
        /*
         * MESSAGE BOX: ERROR HANDLER
         */

        echo "<div id=\"Template-Form\"><div><h1 class=\"Template-Form\">" . $this->mFormTitle . "</h1></div>\n";
        if (!empty($_POST[ERROR_SECTION]) && !empty($_POST[ERROR_CODE])) {
            $tErrorMsg = new ErrorMessage();
            $tErrorMsg->SetErrorCode($_POST[ERROR_CODE]);
            $tErrorMsg->SetErrorSection($_POST[ERROR_SECTION]);
            echo "<div class=\"ErrorMessage-Container\">" . $tErrorMsg->GetErrorMessage() . "</div>";
        }
        ?>

        <ul id="AkunSetting-Container">
            <li rel="Username">
                <div class="Title">Username</div>
                <div class="Info">Username digunakan sebagai identitas untuk login ke dalam sistem.</div>

                <div class="CurrentInfo" id="Username"><div class="Left">USERNAME</div><div><?php echo $_SESSION['User']['Username'] ?></div></div>
            </li>
            <li rel="Password">
                <div class="Title">Password</div>
                <div class="Info">Kata sandi digunakan untuk login ke dalam sistem.</div>

                <div class="CurrentInfo" id="Password"><div class="Left">PASSWORD</div><div>*****</div></div>
            </li>
            <li rel="Email" class="Last">
                <div class="Title">Email</div>
                <div class="Info">Alamat email digunakan sebagai kontak informasi.</div>

                <div class="CurrentInfo" id="Email"><div class="Left">EMAIL</div><div><?php echo $tEmail ?></div></div>
            </li>
        </ul>

        <div id="AkunSetting-Form" title="Form Pengaturan Akun">Please wait..</div>

    </div>
    <?php
}
?>
